Domain Modeling Made Functional
https://pragprog.com/titles/swdddf/domain-modeling-made-functional/swdddf_hu_f78e848391a72c47.jpg
DDD と FP を組み合わせた設計に関する本
FPの中核となる原則を適用することで、OOPのアプローチよりも柔軟かつ簡潔にモデリングするする手法を学ぶ
プログラミング言語には F# を採用
静的型付けの FP ならどれでもいける
Clojure でも Spec を活用すればいけそう?
書籍: データ指向プログラミング
大きく3つのパートに分けられる
1. Unstanding the domain(ドメインを理解する)
DDD の背後にある考え方と、ドメインを共有することの重要性について
Event Storming のようなドメインを共有する手法について
大きなドメインを小さなコンポーネントに分割し、独立して実装できるようにする
セクション
Introducing Domain-Driven Design
Understanding the Domain
A Functional Architecture
2. Modeling the domain(ドメインのモデリング)
ドメインから1つのワークフローを取り上げ、それを関数型な手法でモデリングする
この手法が OOP のアプローチとどのように異なるのかを理解し、要求を把握するために型を使用する方法を学ぶ
二重の役割を果たす簡潔なコードを書くことができるようになる
ドメインに関する読みやすいドキュメントとしてのコード
残りの実装がそのうえに構築できる、コンパイル可能なフレームワークとしてのコード
セクション
Understanding Types
Domain Modeling with Types
Integrity and Consistency in the Domain
Modeling Workflows as Pipelines
3. Implementing the domain(ドメインの実装)
モデリングしたワークフローを実装する
この過程で、関数合成 や 部分適用、モナド といった一般的な FP のテクニックの使い方を学ぶ
セクション
Understanding Functions
Implementation: Composing a Pipeline
Implementation: Working with Errors
DMMF: Serialization
DMMF: Persistence
Evolving a Design and Keeping It Clean
https://zenn.dev/labbase/articles/b1c513c32fe15e
https://qiita.com/yasuabe2613/items/5ab33e103e4105630e4c
/koushisa/Domain Modeling Made Functional
/mrsekut-p/『Domain Modeling Made Functional』
https://speakerdeck.com/swlaschin/domain-driven-design-with-the-f-number-type-system-f-number-unctional-londoners-2014
https://www.youtube.com/watch?v=2JB1_e5wZmU
https://www.youtube.com/watch?v=MlPQ0FsPxPY
2024年6月に満を辞して日本語版が販売される。
関数型ドメインモデリング ドメイン駆動設計とF#でソフトウェアの複雑さに立ち向かおう
#FP #DDD #読書メモ #読了